// 获取应用实例page
const app = getApp() 
const common = require('./../../../utils/common.js');
 
Page({
    data: {
        user_data: null,
    },
    onLoad() {
   
    },

    // 每次显示时
    onShow() {
      this.getUserInfo();
    },

    // 获取用户信息
    getUserInfo(e) {
        var __this = this;
        // 获取用户
        var result = common.request_api('/api/ums/user/user/info/v2', {}, false,'get');
        result.then(res => {
           console.log('resresresres',res)
        });
    },

    // 样板列表
    goto_template_list: function (events) {
        console.log(events);
        // 跳转到样板列表
        wx.navigateTo({
            url: '/alpha/pages/alpha_template_list/template_list',
        });
    },

       // 样板列表
       goto_supply_list: function (events) {
        // 跳转到样板列表
        wx.navigateTo({
            url: '/alpha/pages/alpha_material/index',
        });
    },

    // 物料供应商
    goto_supplier_list: function (events) {
        wx.navigateTo({
            url: '/alpha/pages/alpha_supplier/index',
        });
    },
    // 新增采购单
    handleAddPurchaseOrder() {
        wx.navigateTo({
          url: '/alpha/pages/alpha_add_purchase_order/index',
        });
      },
          // 新增采购单
          handleMakeApply() {
              wx.navigateTo({
                url: '/alpha/pages/alpha_make_apply/index',
              });
            }
})
